$(document).ready(function () {
    // In the case of iOS, user agent turns off attribute autocapitalize and autocorrect of the text box
    var ua = navigator.userAgent;
    if (ua.search(/iPhone/) !== -1) {
        // iOS
        $(
            '#email01,#email02,#email03,#zip,#city,#street,#card_owner,#nickname,#secret_a,#office_name,#position_name,#prefecture_input,#otherReason,#birthday,#userid,#username'
        ).attr('autocapitalize', 'off').attr('autocorrect', 'off');
    }
    // turns off type on second auth birthday 
    if (document.querySelector('#birthday')) {
        $('#birthday').get(0).type = 'tel';
    }
    // change the type attribute of tel1,tel2,tel3 from text to tel.
    if (document.querySelector('#tel1') && document.querySelector('#tel2') && document.querySelector('#tel3')) {
        $('#tel1').get(0).type = 'tel';
        $('#tel2').get(0).type = 'tel';
        $('#tel3').get(0).type = 'tel';
    }
    // change the type attribute of fax1,fax2,fax3 from text to tel.
    if (document.querySelector('#fax1') && document.querySelector('#fax2') && document.querySelector('#fax3')) {
        $('#fax1').get(0).type = 'tel';
        $('#fax2').get(0).type = 'tel';
        $('#fax3').get(0).type = 'tel';
    }
    // change the type attribute of m_tel1,m_tel2,m_tel3 from text to tel.
    if (document.querySelector('#m_tel1') && document.querySelector('#m_tel2') && document.querySelector(
            '#m_tel3')) {
        $('#m_tel1').get(0).type = 'tel';
        $('#m_tel2').get(0).type = 'tel';
        $('#m_tel3').get(0).type = 'tel';
    }
    // When I want to add common processing, please add it under this line.
});